@import './common.scss';
@import './reset.scss';
@import './theme/dark.scss';
@import './theme/light.scss';
@import './font.scss';

.esri-view .esri-view-surface--inset-outline:focus::after{
  outline: none !important;
}
:root {
  --space-default: 15px;
  --menu-bg-color: #1F2935;
  --html-bg-color: #DBE7EE;
  --card-bg: #fff;
  --card-shadow: var(--el-box-shadow-light);
}

.el-menu {
  --el-menu-item-height: 60px;
  --el-menu-active-color: var(--el-color-primary);
  --el-menu-text-color: var(--el-color-white);
  --el-menu-hover-text-color: var(--el-color-primary-light-3);
  --el-menu-bg-color: var(--menu-bg-color);
  .el-menu-item.is-active, .el-menu-item:hover, .el-sub-menu__title:hover {
    color: var(--el-menu-text-color);
    background: var(--el-menu-hover-text-color);
  }
}
.el-menu .el-menu-item:hover,
.el-menu .el-sub-menu__title:hover,
.el-menu--horizontal>.el-sub-menu .el-sub-menu__title:hover,
.el-menu--horizontal .el-menu-item:not(.is-disabled):hover {
  background: #3E4C59;
}

.el-sub-menu.is-active.is-opened .el-sub-menu__title {
  background: none !important;
  &::after {
    content: none;
  }
}

.el-sub-menu.is-active .el-sub-menu__title,
.el-menu--horizontal>.el-menu-item.is-active,
.el-menu--horizontal>.el-sub-menu.is-active .el-sub-menu__title,
.el-menu .el-menu-item.is-active,
.el-menu--horizontal .el-menu-item:not(.is-disabled):focus,
.el-menu--horizontal > .el-sub-menu:hover .el-sub-menu__title {
  background: var(--el-menu-hover-text-color) !important;
  color: var(--el-menu-text-color) !important;
  transition: none;
  &::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    border-radius: 5px;
    width: 5px;
    background: var(--el-color-primary);
  }
}

.el-menu--horizontal > .el-menu-item.is-active,
.el-menu--horizontal .el-menu-item:not(.is-disabled):hover,
.el-menu--horizontal .el-menu-item:not(.is-disabled):focus,
.el-menu--horizontal > .el-sub-menu:hover .el-sub-menu__title,
.el-menu--horizontal > .el-sub-menu.is-active .el-sub-menu__title,
.el-menu--horizontal .el-menu .el-menu-item.is-active,
.el-menu--horizontal .el-menu .el-sub-menu.is-active > .el-sub-menu__title,
.el-menu--horizontal > .el-sub-menu .el-sub-menu__title {
  color: var(--el-menu-text-color) !important;
  border: none;
  &::after {
    content: none;
  }
}

.el-menu--horizontal>.el-menu-item {
  border: none;
}

html, body, #app {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

html {
  font-size: 100Px;
  color: #333;
}

#app {
  // background: var(--html-bg-color);
  display: flex;
  flex-direction: column;
  .view-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: auto;
  }
}

body, #app {
  font-size: 14px;
}
.el-form-item__label {
  padding-left: $space-margin;
}
.el-form--inline .el-form-item {
  margin-right: $space-margin !important;
}

.el-container {
  height: 100%;
  overflow: hidden;
  color: var(--el-color-white);
  .el-header {
    display: flex;
    align-items: center;
    background: $menu-color;
    padding: 0;
    position: relative;
  }
  .el-aside {
    background: $menu-color;
    max-width: 200px;
    display: flex;
    flex-direction: column;
    .el-menu {
      flex: 1;
      background: transparent;
    }
  }
  .el-main {
    display: flex;
    flex-direction: column;
    padding: $space-margin;
    position: relative;
    &.no-pd {
      padding: 0;
    }
    > .view-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      position: relative;
      overflow: auto;
    }
  }
}

.header-enter-active, .header-leave-active {
  transition: all .3s;
}
.header-enter-from, .header-leave-to {
  height: 0!important;
}
.aside-enter-active, .aside-leave-active {
  transition: all .3s;
}
.aside-enter-from, .aside-leave-to {
  max-width: 0!important;
}

.el-form-item {
  &.w33 {
    display: inline-flex;
    width: 33.333333%;
  }
  &.w50 {
    display: inline-flex;
    width: 50%;
  }
  &.w66 {
    display: inline-flex;
    flex: 66.666666%;
  }
  &:last-child {
    margin: 0;
  }
}

.el-input, .el-select, .el-cascader, .el-input-number--medium, .el-date-editor.el-input, .el-date-editor.el-input__inner, .el-input-number {
  width: 100%;
  vertical-align: bottom;
  // width: 200px!important;
}
.el-date-editor.el-input__inner {
  box-shadow: none;
  padding: 0 10px;
  background: #fff;
  &.is-disabled {
    background: var(--el-disabled-bg-color);
  }
  &:hover {
    box-shadow: none;
  }
}

.el-loading-spinner {
  margin-top: none;
  transform: translateY(-50%);
}
.el-drawer__header {
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-color);
}

.el-icon {
  vertical-align: middle !important;
}

.el-dialog__body {
  .e-table {
    box-shadow: none!important;
  }
}
